lib/kargs: Don't expose OstreeKernelArgs autoptr cleanup on old glib
authorDan Nicholson <nicholson@endlessm.com>
Fri, 26 Jul 2019 16:42:42 +0000 (10:42 -0600)
committerAtomic Bot <atomic-devel@projectatomic.io>
Sat, 27 Jul 2019 03:20:21 +0000 (03:20 +0000)
commit19e764cea24464bd6f6761d35903e204a0e69422
tree8b5d3cbcecfdf9f28a72554ff2d22883bf64fecc
parentd2a9c8604eb6df7d88c4709f5d6d059bc1487c03
lib/kargs: Don't expose OstreeKernelArgs autoptr cleanup on old glib

Move the OstreeKernelArgs autoptr cleanup definition to
ostree-autocleanups.h, which will only expose the definitions when
building ostree or if glib is new enough. The include of
ostree-kernel-args.h needs to be moved before ostree-autocleanups.h in
ostree.h so that the OstreeKernelArgs type is declared when the autoptr
cleanup is defined. All the places it's used already pull in libglnx.h
first so that the compat macros are picked up if glib it too old during
the ostree build.

Closes: #1892
Approved by: jlebon
src/libostree/ostree-autocleanups.h
src/libostree/ostree-kernel-args.h
src/libostree/ostree.h